---
description: "Reference for Nitric's v0 .NET library - Get a upload url for a file from a bucket."
---

# .NET - Bucket.File.GeUploadUrl()

Create a upload url for a file within a bucket.

```csharp
using Nitric.Sdk;
using Nitric.Sdk.Storage;

var assets = Nitric.Bucket('assets').With(BucketPermission.Writing);

var logo = assets.File('images/logo.png');

// Create a read-only signed url reference for uploading
var uploadUrl = logo.GetUploadUrl();

Nitric.Run();
```

## Parameters

<Properties>
  <Property name="expiry" type="int">
    Seconds until link expiry. Defaults to `600`, Maximum of `604800` (7 days).
  </Property>
</Properties>

## Examples

### Create a temporary file upload link for a user

```csharp
using Nitric.Sdk;
using Nitric.Sdk.Storage;

var assets = Nitric.Bucket('assets').With(BucketPermission.Writing);

var logo = assets.File('images/logo.png');

// Create a read-only signed url reference for uploading
var downloadUrl = logo.GetUploadUrl(300);

Nitric.Run();
```
